package com.sunjob.mrotech.mapper;
import com.sunjob.common.domain.tech.RepairProcess2;
import com.sunjob.common.domain.tech.RepairProcess2DO;
import com.sunjob.common.domain.tech.TransShape2;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author : xiaozhoutongxue
 * @date : 2022/8/8 10:47
 */

@Mapper
@Component
public interface RepairProcess2Mapper {
    /** 获得拥有修程工艺的前几个二级构型 */
    List<TransShape2> getRepairProcess2ByLimit3();

    /**
     * 根据二级修程工艺id获得二级修程工艺
     */
    RepairProcess2 getRepairProcess2ById(Long repairProcess2Id);

    /**
     * 根据二级构型id获得二级修程工艺
     */
    RepairProcess2 getRepairProcess2ByShape2Id(Long shape2Id);

    /**
     * 根据二级修程工艺id给某二级构型新增修程工艺
     */
    int insertRepairProcess2ById(RepairProcess2DO repairProcess2DO);

    /**
     * 绑定修程工艺通过构型id
     */
    int bindRepairProcessByShape2Id(Long shape2Id, Long repairProcess2Id, String updateCreateBy, LocalDateTime updateCreateTime);

    /**
     * 根据二级修程工艺id删除一个二级修程工艺
     */
    int deleteRepairProcess2ById(Long repairProcess2Id, Long version, String updateCreateBy, LocalDateTime updateCreateTime);

    /**
     * 修改一个二级修程工艺(小修改)
     */
    int uptateRepairProcess2Small(RepairProcess2DO repairProcess2DO);

}
